//
// Created on 2025/10/31.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".
#include "aki/jsbind.h"
#include <hilog/log.h>
#include<nlohmann/json.hpp>
#include <ScreenRecorder.h>
using json = nlohmann::json;
#undef LOG_DOMAIN
#undef LOG_TAG
#define LOG_DOMAIN 0x3200  // 全局domain宏，标识业务领域
#define LOG_TAG "MY_TAG"   // 全局tag宏，标识模块日志tag
const int GLOBAL_RESMGR = 0xFF00;
const char *TAG = "[Sample_audio]";

int startScreenCapture(std::string configStr,bool isMicrophone){
    auto& recorder=ScreenRecorder::instance();
    return recorder.startScreenCapture(configStr, isMicrophone);
}

int stopScreenCapture(){
    auto& recorder=ScreenRecorder::instance();
    return recorder.stopScreenCapture();
}


JSBIND_GLOBAL() {
    JSBIND_FUNCTION(startScreenCapture);
    JSBIND_FUNCTION(stopScreenCapture);
}

JSBIND_ADDON(m2b_oh)


